"""mySite URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
# from app import views
# from blog import views as blogViews
from nutriApp import views as appViews
# from homeApp import views as homeViews
# from django.conf.urls import url
from django.views.generic.base import RedirectView

urlpatterns = [
    path('', RedirectView.as_view(url='index/')),  # 新增：将空路径重定向到 index/
    # url(r'^favicon\.ico', RedirectView.as_view(url=r'static/favicon.ico')),
    path('index/', appViews.index),
    #path('tvbox/', homeViews.tvbox),
    # path('blogindex/', blogViews.blogIndex),
    # path('group/in/list/', views.group_in_list),
    # path('group/in/<int:nid>/addEdit/', views.group_in_addEidt),
    # path('group/in/<int:nid>/del/', views.group_in_del),
    # path('group/follow/list/', views.group_follow_list),
    # path('group/follow/<int:nid>/addEdit/', views.group_follow_addEidt),
    # path('group/follow/<int:nid>/del/', views.group_follow_del),
    # path('group/out/list/', views.group_out_list),
    # path('layout/', views.layout),
    # path('', views.group_in_list),
    path('admin/', admin.site.urls),
]

admin.site.index_title = "协和胸外营养管理"
admin.site.site_header = "协和胸外营养管理"
admin.site.site_title = "Thoracic Nutrition Management"
admin.site.site_url = "index/"
